#include <stdio.h>
#include "version.h"
#include "fmod1-shared-ab.h"
#include "fmod2-shared-ab.h"
#include "fmod1-static-a.h"
#include "fmod1-static-b.h"
#include "imod2-static-a.h"
#include "imod2-static-b.h"

int main(int argc, char *argv[])
{
    printf("VERSION: " VERSION_TAG "-" VERSION_REV ", BUILD: " VERSION_BUILD_PTS ", SVNINFO: " VERSION_SVN_ALL "\n");

    IMod1SharedAB *iab1 = FMod1SharedAB::instance();
    IMod1StaticA  *ia1  = iab1->createStaticA();
    ia1->fun1();
    ia1->fun2();
    iab1->destoryStaticA(ia1);

    IMod1StaticA *ia1_1 = FMod1StaticA::create();
    ia1_1->fun1();
    ia1_1->fun2();
    FMod1StaticA::destory(ia1_1);

    IMod1StaticB *ib1 = iab1->createStaticB();
    ib1->fun1();
    ib1->fun2();
    iab1->destoryStaticB(ib1);

#if 0
    IMod1StaticB *ib1_1 = FMod1StaticB::create();
    ib1_1->fun1();
    ib1_1->fun2();
    FMod1StaticB::destory(ib1_1);
#endif

    IMod2SharedAB *iab2 = FMod2SharedAB::instance();
    IMod2StaticA  *ia2  = iab2->createStaticA();
    ia2->fun1();
    ia2->fun2();
    iab2->destoryStaticA(ia2);

    IMod2StaticB *ib2 = iab2->createStaticB();
    ib2->fun1();
    ib2->fun2();
    iab2->destoryStaticB(ib2);

    return 0;
}
